package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 支付对象 pay
 * 
 * @author ruoyi
 * @date 2024-12-16
 */
@Builder
public class Pay extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 渠道名称 */
    @Excel(name = "渠道名称")
    private String channelName;

    /** 渠道id */
    @Excel(name = "渠道id")
    private String channelId;

    /** 商户id */
    @Excel(name = "商户id")
    private String merchandId;

    /** 同步回调url */
    @Excel(name = "同步回调url")
    private String syncUrl;

    /** 异步回调url */
    @Excel(name = "异步回调url")
    private String asynUrl;

    /** 公钥 */
    @Excel(name = "公钥")
    private String publicKey;

    /** 私钥 */
    @Excel(name = "私钥")
    private String privateKey;

    /** 渠道状态（0开启，1关闭） */
    @Excel(name = "渠道状态", readConverterExp = "0=开启，1关闭")
    private Long channelStatus;

    /** 订单号id */
    @Excel(name = "订单号id")
    private String orderId;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private Long payAmount;

    /** 支付方式的唯一id */
    @Excel(name = "支付方式的唯一id")
    private String paymentMethodId;

    /** 支付状态 200：成功 300:支付失败 */
    @Excel(name = "支付状态 200：成功 300:支付失败")
    private Long paymentStatus;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    /** 支付总金额 */
    @Excel(name = "支付总金额")
    private Long paymentFee;

    /** 结果字符串 */
    @Excel(name = "结果字符串")
    private String paymentJson;

    /** 通知url */
    @Excel(name = "通知url")
    private String notifyUrl;

    /** 交易类型：1:支付宝 2：微信 3：银链支付 4：paypal */
    @Excel(name = "交易类型：1:支付宝 2：微信 3：银链支付 4：paypal")
    private String tradeType;

    /** 1：未支付 2：未支付且已生成二维码 3：已支付 4：退款 */
    @Excel(name = "1：未支付 2：未支付且已生成二维码 3：已支付 4：退款")
    private Long payStatus;

    /** 微信二维码 */
    @Excel(name = "微信二维码")
    private String codeUrl;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setChannelName(String channelName) 
    {
        this.channelName = channelName;
    }

    public String getChannelName() 
    {
        return channelName;
    }
    public void setChannelId(String channelId) 
    {
        this.channelId = channelId;
    }

    public String getChannelId() 
    {
        return channelId;
    }
    public void setMerchandId(String merchandId) 
    {
        this.merchandId = merchandId;
    }

    public String getMerchandId() 
    {
        return merchandId;
    }
    public void setSyncUrl(String syncUrl) 
    {
        this.syncUrl = syncUrl;
    }

    public String getSyncUrl() 
    {
        return syncUrl;
    }
    public void setAsynUrl(String asynUrl) 
    {
        this.asynUrl = asynUrl;
    }

    public String getAsynUrl() 
    {
        return asynUrl;
    }
    public void setPublicKey(String publicKey) 
    {
        this.publicKey = publicKey;
    }

    public String getPublicKey() 
    {
        return publicKey;
    }
    public void setPrivateKey(String privateKey) 
    {
        this.privateKey = privateKey;
    }

    public String getPrivateKey() 
    {
        return privateKey;
    }
    public void setChannelStatus(Long channelStatus) 
    {
        this.channelStatus = channelStatus;
    }

    public Long getChannelStatus() 
    {
        return channelStatus;
    }
    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }
    public void setPayAmount(Long payAmount) 
    {
        this.payAmount = payAmount;
    }

    public Long getPayAmount() 
    {
        return payAmount;
    }
    public void setPaymentMethodId(String paymentMethodId) 
    {
        this.paymentMethodId = paymentMethodId;
    }

    public String getPaymentMethodId() 
    {
        return paymentMethodId;
    }
    public void setPaymentStatus(Long paymentStatus) 
    {
        this.paymentStatus = paymentStatus;
    }

    public Long getPaymentStatus() 
    {
        return paymentStatus;
    }
    public void setPaymentTime(Date paymentTime) 
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() 
    {
        return paymentTime;
    }
    public void setPaymentFee(Long paymentFee) 
    {
        this.paymentFee = paymentFee;
    }

    public Long getPaymentFee() 
    {
        return paymentFee;
    }
    public void setPaymentJson(String paymentJson) 
    {
        this.paymentJson = paymentJson;
    }

    public String getPaymentJson() 
    {
        return paymentJson;
    }
    public void setNotifyUrl(String notifyUrl) 
    {
        this.notifyUrl = notifyUrl;
    }

    public String getNotifyUrl() 
    {
        return notifyUrl;
    }
    public void setTradeType(String tradeType) 
    {
        this.tradeType = tradeType;
    }

    public String getTradeType() 
    {
        return tradeType;
    }
    public void setPayStatus(Long payStatus) 
    {
        this.payStatus = payStatus;
    }

    public Long getPayStatus() 
    {
        return payStatus;
    }
    public void setCodeUrl(String codeUrl) 
    {
        this.codeUrl = codeUrl;
    }

    public String getCodeUrl() 
    {
        return codeUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("channelName", getChannelName())
            .append("channelId", getChannelId())
            .append("merchandId", getMerchandId())
            .append("syncUrl", getSyncUrl())
            .append("asynUrl", getAsynUrl())
            .append("publicKey", getPublicKey())
            .append("privateKey", getPrivateKey())
            .append("channelStatus", getChannelStatus())
            .append("orderId", getOrderId())
            .append("payAmount", getPayAmount())
            .append("paymentMethodId", getPaymentMethodId())
            .append("paymentStatus", getPaymentStatus())
            .append("paymentTime", getPaymentTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("paymentFee", getPaymentFee())
            .append("paymentJson", getPaymentJson())
            .append("notifyUrl", getNotifyUrl())
            .append("tradeType", getTradeType())
            .append("payStatus", getPayStatus())
            .append("codeUrl", getCodeUrl())
            .toString();
    }
}
